package com.gite.nouette.admin.implementation.integrator.assembler.command;

import com.gite.nouette.admin.contract.integrator.assembler.command.IAssemblerCommandCreateModule;
import com.gite.nouette.admin.contract.integrator.director.command.IDirectorCommandCreateModule;
import com.gite.nouette.admin.contract.model.IManager;

public abstract class AbstractAssemblerCommandCreateModule implements
		IAssemblerCommandCreateModule {
	private IManager parentProduct;
	private IDirectorCommandCreateModule director;

	@Override
	public void run() {
		getDirector().constructProduct();
		getParentProduct().addCommand(getDirector().getProduct());
	}

	@Override
	public IManager getParentProduct() {
		return this.parentProduct;
	}

	@Override
	public void setParentProduct(IManager parentProduct) {
		this.parentProduct = parentProduct;
	}

	@Override
	public IDirectorCommandCreateModule getDirector() {
		return this.director;
	}

	public void setDirector(IDirectorCommandCreateModule director) {
		this.director = director;
	}
}
